home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / SHARE / prog / POVRAY / E-P-O.ZIP / THING-5.INC < prev    next >
Encoding:
Text File  |  1996-10-31  |  6.9 KB  |  164 lines

  1.  
  2. //------------------------------------------------------------------->
  3. //
  4. // thing-5.inc
  5. //
  6. // "Easy POV Oven"
  7. //
  8. // Written By: Paul T. Dawson
  9. //             ptdawson@voicenet.com
  10. //             http://www.voicenet.com/~ptdawson
  11. //
  12. // All code and techniques are PUBLIC DOMAIN - have fun with it!
  13. //
  14. //------------------------------------------------------------------->
  15. //
  16. // Thing_5 is a group of miniature people. This eats a LOT of memory!
  17. //
  18. // This is a total jumble!!! It's derived from the standard P4 include
  19. // file, but with loops and random numbers added. Whew!?!
  20. //
  21. //------------------------------------------------------------------->
  22. //
  23. // Use a special seed, so things turn out the same in final scene.
  24.  
  25.         #declare T5R = seed(444)
  26.  
  27. //------------------------------------------------------------------->
  28. //
  29. // Start the big loop to make all of the people.
  30.  
  31.         #declare THING_5_LOOP = 1 #while ( THING_5_LOOP <= 9 )
  32.  
  33. //------------------------------------------------------------------->
  34. //
  35. // Declare the *textures* for everything.
  36.  
  37.         #declare P4_Eye_Texture     =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
  38.         #declare P4_Glasses_Texture =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
  39.         #declare P4_Hair_Texture    =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
  40.         #declare P4_Hat_Texture     =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
  41.         #declare P4_Shirt_Texture   =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
  42.         #declare P4_Shoe_Texture    =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
  43.         #declare P4_Shorts_Texture  =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
  44.         #declare P4_Skin_Texture    =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
  45.  
  46. //------------------------------------------------------------------->
  47. //
  48. // Now choose *types* of things. You will have to read the directions
  49. // to see what numbers are legal here!
  50.  
  51.         #declare P4_Eye_Type = 1
  52.         #declare P4_Glasses_Type = int(rand(T5R)*2)
  53.         #declare P4_Hair_Type = int(rand(T5R)*3)+1
  54.         #declare P4_Hand_Type = 1
  55.  
  56.         #declare P4_Hat_Type = int(rand(T5R)*5)+1
  57.         #if (P4_Hair_Type=2) #declare P4_Hat_Type=0 #end
  58.  
  59.         #declare P4_Mouth_Type = int(rand(T5R)*5)+1
  60.         #declare P4_Nose_Type = 1
  61.         #declare P4_Shirt_Type = 2
  62.         #declare P4_Shoe_Type = 3
  63.         #declare P4_Shorts_Type = int(rand(T5R)*3)+1
  64.  
  65. //------------------------------------------------------------------->
  66. //
  67. // Set the sizes of various things (all the same).
  68.  
  69.         #declare P4_Leg_Length = 34
  70.         #declare P4_Neck_Height = 3
  71.         #declare P4_Shirt_Height = 22
  72.         #declare P4_Shorts_Height = 12
  73.  
  74. //------------------------------------------------------------------->
  75. //
  76. // Choose the rotation values. Only arms are random!
  77.  
  78.         #declare P4_Hat_Rotate = < 10, 60, 0 >
  79.         #declare P4_Neck_Rotate = < -10, 30, 0 >
  80.         #declare P4_Waist_Rotate = < -10, 20, 0 >
  81.  
  82.         #declare P4_Left_Hand_Rotate = < -40, 0, -40 >
  83.         #declare P4_Right_Hand_Rotate = < 10, 0, 40 >
  84.  
  85.         #declare P4_Left_Elbow_Rotate = < 00, (rand(T5R)*80)-40, 0 >
  86.         #declare P4_Right_Elbow_Rotate = < 00, (rand(T5R)*80)-40, 0 >
  87.  
  88.         #declare P4_Left_Eyelid_Rotate = -40
  89.         #declare P4_Right_Eyelid_Rotate = -40
  90.  
  91.         #declare P4_Left_Knee_Rotate = < -10, 0, 0 >
  92.         #declare P4_Right_Knee_Rotate = < -10, 0, 0 >
  93.  
  94.         #declare P4_Left_Leg_Rotate = < 10, 0, -10 >
  95.         #declare P4_Right_Leg_Rotate = < 10, 0, 10 >
  96.  
  97.         #declare P4_Left_Shoulder_Rotate = < (rand(T5R)*80)-40, (rand(T5R)*80)-40, (rand(T5R)*80)-40 >
  98.         #declare P4_Right_Shoulder_Rotate = < (rand(T5R)*80)-40, (rand(T5R)*80)-40, (rand(T5R)*80)-40 >
  99.  
  100. //------------------------------------------------------------------->
  101. //
  102. // Miscellaneous.
  103.  
  104.         #declare P4_Holding_Flag = false
  105.         #declare P4_Bracelet_Flag = false
  106.         #declare P4_Total_Scale = 4/100
  107.         #declare P4_Y_Adjust = 1.6
  108.  
  109. //------------------------------------------------------------------->
  110. //
  111. // Now call "p4_main.inc" to create the object.
  112.  
  113.         #include "p4_main.inc"
  114.  
  115. //------------------------------------------------------------------->
  116. //
  117. // End the big loop.
  118.  
  119.         #if (THING_5_LOOP=1) #declare TEMP_01=object{One_Person} #end
  120.         #if (THING_5_LOOP=2) #declare TEMP_02=object{One_Person} #end
  121.         #if (THING_5_LOOP=3) #declare TEMP_03=object{One_Person} #end
  122.         #if (THING_5_LOOP=4) #declare TEMP_04=object{One_Person} #end
  123.         #if (THING_5_LOOP=5) #declare TEMP_05=object{One_Person} #end
  124.         #if (THING_5_LOOP=6) #declare TEMP_06=object{One_Person} #end
  125.         #if (THING_5_LOOP=7) #declare TEMP_07=object{One_Person} #end
  126.         #if (THING_5_LOOP=8) #declare TEMP_08=object{One_Person} #end
  127.         #if (THING_5_LOOP=9) #declare TEMP_09=object{One_Person} #end
  128.  
  129.         #declare THING_5_LOOP = THING_5_LOOP + 1 #end
  130.  
  131. //------------------------------------------------------------------->
  132. //
  133. // Now put everything together.
  134.  
  135.         #declare Thing_5 = union {
  136.  
  137.                 object { TEMP_01 rotate y*(rand(T5R)*360) translate < -2.5, 0, -2.5 > }
  138.                 object { TEMP_02 rotate y*(rand(T5R)*360) translate <  0, 0, -2.5 > }
  139.                 object { TEMP_03 rotate y*(rand(T5R)*360) translate <  2.5, 0, -2.5 > }
  140.                 object { TEMP_04 rotate y*(rand(T5R)*360) translate < -2.5, 0,  0 > }
  141.                 object { TEMP_05 rotate y*(rand(T5R)*360) translate <  0, 0,  0 > }
  142.                 object { TEMP_06 rotate y*(rand(T5R)*360) translate <  2.5, 0,  0 > }
  143.                 object { TEMP_07 rotate y*(rand(T5R)*360) translate < -2.5, 0,  2 > }
  144.                 object { TEMP_08 rotate y*(rand(T5R)*360) translate <  0, 0,  2.5 > }
  145.                 object { TEMP_09 rotate y*(rand(T5R)*360) translate <  2.5, 0,  2.5 > }
  146.  
  147.                 // Bases for them to stand on.
  148.                         cylinder {<-2.5,0,-2.5> <-2.5,0.11,-2.5>,0.9 pigment { Red } }
  149.                         cylinder {<   0,0,-2.5> <   0,0.11,-2.5>,0.9 pigment { Red } }
  150.                         cylinder {< 2.5,0,-2.5> < 2.5,0.11,-2.5>,0.9 pigment { Red } }
  151.                         cylinder {<-2.5,0,   0> <-2.5,0.11,   0>,0.9 pigment { Red } }
  152.                         cylinder {<   0,0,   0> <   0,0.11,   0>,0.9 pigment { Red } }
  153.                         cylinder {< 2.5,0,   0> < 2.5,0.11,   0>,0.9 pigment { Red } }
  154.                         cylinder {<-2.5,0, 2.5> <-2.5,0.11, 2.5>,0.9 pigment { Red } }
  155.                         cylinder {<   0,0, 2.5> <   0,0.11, 2.5>,0.9 pigment { Red } }
  156.                         cylinder {< 2.5,0, 2.5> < 2.5,0.11, 2.5>,0.9 pigment { Red } }
  157.  
  158.         } // End of union.
  159.  
  160. //------------------------------------------------------------------->
  161. //
  162. // End of this file.
  163.  
  164.